package com.totoro.domain;

import java.util.Collection;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Embedded;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Inheritance;
import javax.persistence.InheritanceType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

/**
 * @generated
 */
// 毕业设计实体类
@Entity
@Table(name = "project")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
public class Project extends BaseDomain {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	// 主键
	@Id
	@GeneratedValue(strategy = GenerationType.TABLE)
	private Integer id;// 主键
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "project")
	private Collection<Tutorial> tutorial;// 指导的论文
	/**
	 * @generated
	 */
	private Double score;// 成绩
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "fidelity_id")
	private Fidelity fidelity;// 题目性质
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "projectFrom_id")
	private ProjectFrom projectFrom;// 题目来源
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "projectCategory_id")
	private ProjectCategory projectCategory;// 题目类别
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "projectType_id")
	private ProjectType projectType;// 题目类型
	/**
	 * @generated
	 */
	private String title;// 题目
	/**
	 * @generated
	 */
	private String introduction;// 简介
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "project")
	private Collection<StudentApplication> studentApplication;// 学生报题
	/**
	 * @generated
	 */
	@OneToOne(mappedBy = "project")
	private Student student;// 学生
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "project")
	private Collection<ExcellentProject> excellentProject;// 优秀论文(设计)
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "project")
	private Collection<ReviewProject> reviewProject;// 评阅的论文
	/**
	 * @generated
	 */
	private String year;// 年份
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "publicReplyGroup_id")
	private PublicReplyGroup publicReplyGroup;// 答辩组
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "project")
	private Collection<AcceptableMajor> acceptableMajor;// 限选专业
	/**
	 * @generated
	 */
	@Embedded
	@AttributeOverrides({
			@AttributeOverride(name = "achievementLevel", column = @Column(name = "achievementLevel")),
			@AttributeOverride(name = "completeness", column = @Column(name = "completeness")),
			@AttributeOverride(name = "statement", column = @Column(name = "statement")),
			@AttributeOverride(name = "reply", column = @Column(name = "reply")),
			@AttributeOverride(name = "remark", column = @Column(name = "remark")) })
	private PublicReply publicReply;// 答辩成绩组件类
	/**
	 * @generated
	 */
	@Embedded
	@AttributeOverrides({
			@AttributeOverride(name = "onSchedule", column = @Column(name = "onSchedule")),
			@AttributeOverride(name = "missionSuccess", column = @Column(name = "missionSuccess")),
			@AttributeOverride(name = "workAttitute", column = @Column(name = "workAttitute")),
			@AttributeOverride(name = "difficultyAndDemand", column = @Column(name = "difficultyAndDemand")),
			@AttributeOverride(name = "tutedTime", column = @Column(name = "tutedTime")) })
	private IntermediateInspection intermediateInspection;// 中期检查表
	/**
	 * @generated
	 */
	// 组件映射
	@Embedded
	@AttributeOverrides({
			@AttributeOverride(name = "title", column = @Column(name = "documentTranslation_title", length = 11)),
			@AttributeOverride(name = "url", column = @Column(name = "documentTranslation_url")) })
	private DocumentTranslation documentTranslation;// 外文文献
	/**
	 * @generated
	 */
	@OneToMany(mappedBy = "project")
	private Collection<Schedule> schedule;// 进程
	/**
	 * 论文或说明书的文件名
	 * 
	 * @generated
	 */
	private String paperFileName;// 论文/说明书文件名
	/**
	 * 其它附件都压缩一个包
	 * 
	 * @generated
	 */
	private String otherAttachmentFileName;// 其它附件文件名

	// 组件映射
	@Embedded
	@AttributeOverrides({ @AttributeOverride(name = "fileName", column = @Column(name = "taskDocument_fileName")) })
	private TaskDocument taskDocument;// 设计任务书

	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "proposer_id")//stg 修改
	private Tutor proposer;// 报题的指导老师
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "taskDocumentApproverFromDepartment_id")
	private Tutor taskDocumentApproverFromDepartment;// 任务书的教研室审核人
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "taskDocumentApproverFromSchool_id")
	private Tutor taskDocumentApproverFromSchool;// 任务书的学院审核人
	/**
	 * @generated
	 */
	@ManyToOne
	@JoinColumn(name = "taskDocumentApproverFromTutor_id")
	private Tutor taskDocumentApproverFromTutor;// 任务书的指导教师审核人（多个指导教师，任何一人均可审）
	/**
	 * @generated
	 */
	private Boolean taskDocumentApproveStateBySchool;// 学院审核任务书通过否
	/**
	 * @generated
	 */
	private Boolean taskDocumentApproveStateByDepartment;// 教研室审核任务书通过否
	/**
	 * @generated
	 */
	private Boolean taskDocumentApproveStateByTutor;// 老师审核任务书通过否

	// 空构造器
	public Project() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	/**
	 * @generated
	 */
	public Double getScore() {
		return score;
	}

	/**
	 * @param score
	 * @generated
	 */
	public void setScore(Double score) {
		this.score = score;
	}

	/**
	 * @generated
	 */
	public String getTitle() {
		return title;
	}

	/**
	 * @param title
	 * @generated
	 */
	public void setTitle(String title) {
		this.title = title;
	}

	/**
	 * @generated
	 */
	public String getIntroduction() {
		return introduction;
	}

	/**
	 * @param introduction
	 * @generated
	 */
	public void setIntroduction(String introduction) {
		this.introduction = introduction;
	}

	/**
	 * @generated
	 */
	public String getYear() {
		return year;
	}

	/**
	 * @param year
	 * @generated
	 */
	public void setYear(String year) {
		this.year = year;
	}

	/**
	 * 论文或说明书的文件名
	 * 
	 * @return 论文或说明书的文件名
	 * @generated
	 */
	public String getPaperFileName() {
		return paperFileName;
	}

	/**
	 * 论文或说明书的文件名
	 * 
	 * @param paperFileName
	 *            论文或说明书的文件名
	 * @generated
	 */
	public void setPaperFileName(String paperFileName) {
		this.paperFileName = paperFileName;
	}

	/**
	 * 其它附件都压缩一个包
	 * 
	 * @return 其它附件都压缩一个包
	 * @generated
	 */
	public String getOtherAttachmentFileName() {
		return otherAttachmentFileName;
	}

	/**
	 * 其它附件都压缩一个包
	 * 
	 * @param otherAttachmentFileName
	 *            其它附件都压缩一个包
	 * @generated
	 */
	public void setOtherAttachmentFileName(String otherAttachmentFileName) {
		this.otherAttachmentFileName = otherAttachmentFileName;
	}

	public Collection<Tutorial> getTutorial() {
		return tutorial;
	}

	public void setTutorial(Collection<Tutorial> tutorial) {
		this.tutorial = tutorial;
	}

	public Fidelity getFidelity() {
		return fidelity;
	}

	public void setFidelity(Fidelity fidelity) {
		this.fidelity = fidelity;
	}

	public ProjectFrom getProjectFrom() {
		return projectFrom;
	}

	public void setProjectFrom(ProjectFrom projectFrom) {
		this.projectFrom = projectFrom;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}

	public ProjectCategory getProjectCategory() {
		return projectCategory;
	}

	public void setProjectCategory(ProjectCategory projectCategory) {
		this.projectCategory = projectCategory;
	}

	public ProjectType getProjectType() {
		return projectType;
	}

	public void setProjectType(ProjectType projectType) {
		this.projectType = projectType;
	}

	public Collection<StudentApplication> getStudentApplication() {
		return studentApplication;
	}

	public void setStudentApplication(
			Collection<StudentApplication> studentApplication) {
		this.studentApplication = studentApplication;
	}

	public Student getStudent() {
		return student;
	}

	public void setStudent(Student student) {
		this.student = student;
	}

	public Collection<ExcellentProject> getExcellentProject() {
		return excellentProject;
	}

	public void setExcellentProject(
			Collection<ExcellentProject> excellentProject) {
		this.excellentProject = excellentProject;
	}

	public Collection<ReviewProject> getReviewProject() {
		return reviewProject;
	}

	public void setReviewProject(Collection<ReviewProject> reviewProject) {
		this.reviewProject = reviewProject;
	}

	public PublicReplyGroup getPublicReplyGroup() {
		return publicReplyGroup;
	}

	public void setPublicReplyGroup(PublicReplyGroup publicReplyGroup) {
		this.publicReplyGroup = publicReplyGroup;
	}

	public Collection<AcceptableMajor> getAcceptableMajor() {
		return acceptableMajor;
	}

	public void setAcceptableMajor(Collection<AcceptableMajor> acceptableMajor) {
		this.acceptableMajor = acceptableMajor;
	}

	public PublicReply getPublicReply() {
		return publicReply;
	}

	public void setPublicReply(PublicReply publicReply) {
		this.publicReply = publicReply;
	}

	public IntermediateInspection getIntermediateInspection() {
		return intermediateInspection;
	}

	public void setIntermediateInspection(
			IntermediateInspection intermediateInspection) {
		this.intermediateInspection = intermediateInspection;
	}

	public DocumentTranslation getDocumentTranslation() {
		return documentTranslation;
	}

	public void setDocumentTranslation(DocumentTranslation documentTranslation) {
		this.documentTranslation = documentTranslation;
	}

	public Collection<Schedule> getSchedule() {
		return schedule;
	}

	public void setSchedule(Collection<Schedule> schedule) {
		this.schedule = schedule;
	}

	public TaskDocument getTaskDocument() {
		return taskDocument;
	}

	public void setTaskDocument(TaskDocument taskDocument) {
		this.taskDocument = taskDocument;
	}

	public Tutor getProposer() {
		return proposer;
	}

	public void setProposer(Tutor proposer) {
		this.proposer = proposer;
	}

	public Tutor getTaskDocumentApproverFromDepartment() {
		return taskDocumentApproverFromDepartment;
	}

	public void setTaskDocumentApproverFromDepartment(
			Tutor taskDocumentApproverFromDepartment) {
		this.taskDocumentApproverFromDepartment = taskDocumentApproverFromDepartment;
	}

	public Tutor getTaskDocumentApproverFromSchool() {
		return taskDocumentApproverFromSchool;
	}

	public void setTaskDocumentApproverFromSchool(
			Tutor taskDocumentApproverFromSchool) {
		this.taskDocumentApproverFromSchool = taskDocumentApproverFromSchool;
	}

	public Tutor getTaskDocumentApproverFromTutor() {
		return taskDocumentApproverFromTutor;
	}

	public void setTaskDocumentApproverFromTutor(Tutor taskDocumentApproverFromTutor) {
		this.taskDocumentApproverFromTutor = taskDocumentApproverFromTutor;
	}

	public boolean isTaskDocumentApproveStateBySchool() {
		return taskDocumentApproveStateBySchool;
	}

	public void setTaskDocumentApproveStateBySchool(
			boolean taskDocumentApproveStateBySchool) {
		this.taskDocumentApproveStateBySchool = taskDocumentApproveStateBySchool;
	}

	public boolean isTaskDocumentApproveStateByDepartment() {
		return taskDocumentApproveStateByDepartment;
	}

	public void setTaskDocumentApproveStateByDepartment(
			boolean taskDocumentApproveStateByDepartment) {
		this.taskDocumentApproveStateByDepartment = taskDocumentApproveStateByDepartment;
	}

	public boolean isTaskDocumentApproveStateByTutor() {
		return taskDocumentApproveStateByTutor;
	}

	public void setTaskDocumentApproveStateByTutor(
			boolean taskDocumentApproveStateByTutor) {
		this.taskDocumentApproveStateByTutor = taskDocumentApproveStateByTutor;
	}


}